#include "SmartPtr.h"


void test1()
{
	//SmartPtr<int> sp1(new int(1));

}
void test2()
{
	//yss::auto_ptr<int> ap1(new int(1));
	//yss::auto_ptr<int> ap2(ap1);
}
void test3()
{
	//...
}
//void test4()
//{
//	yss::shared_ptr<int> sp1(new int(1));
//	cout << sp1.getCount() << endl;
//	yss::shared_ptr<int> sp2(sp1);
//	cout << sp2.getCount() << endl;
//
//	yss::shared_ptr<int> sp3(new int(2));////
//}

void test5()
{
	/*yss::shared_ptr<int> sp1(new int(1));
	cout << sp1.getCount() << endl;
	yss::shared_ptr<int> sp2(sp1);
	cout << sp2.getCount() << endl;*/

	yss::shared_ptr<int> sp1(new int(1));
	cout << sp1.getCount() << endl;
	yss::shared_ptr<int> sp2(new int(5));
	sp2 = sp1;

	cout << sp2.getCount() << endl;
}
int main()
{
	//test1();
	//test2();
	//test3();
	//test4();
	test5();

	return 0;
}
